// 导入所有组件
import UniUtils from './src/components/UniUtils.vue'
import HttpUtils from "./src/utils/HttpUtils";
import BluetoothUtils from "./src/utils/BluetoothUtils";
import ServiceUtils from "./src/utils/ServiceUtils";

const components = [UniUtils]
const install = (vue)=> {
    /* istanbul ignore if */
    if (install.installed) return;
    /*eslint-disable*/
    components.map((component) => {
        vue.component(component.name, component); //component.name 此处使用到组件vue文件中的 name 属性
    });
};
/* istanbul ignore if */
if (typeof window !== 'undefined' && window.Vue) {
    install(window.Vue);
};

export default {
    install,
    HttpUtils,
    BluetoothUtils,
    ServiceUtils,
    instance: new UniUtils()
}